const express = require('express');
const app = express();

app.use(function(req,res,next){
    let a = 'suliang';
    req.a = a ;
    console.log("第一个中间件！");
    next();
});
 app.use(function(req,res,next){
    let b = 'ming';
    req.b = b;
    console.log('第二个中间件！');
    next();
 })

 app.get('/' ,(req,res)=>{
    res.send('this is get request' + ' '+req.a + ' ' +req.b)
 })

 app.listen(8081,function(){
    console.log("http://127.0.0.1:8081");
 })